Analyze Menu

From Audacity Manual

Jump to: navigation, search

Analyze contains tools for finding out about the characteristics of your audio, or labeling key features. Plug-ins that accept input but produce no audio output will also be placed in the Analyze menu.


Menu Description
Contents of the Analyze menu

Plot Spectrum A graph displaying the energy of different frequencies in the selected sound.

Find Clipping Creates labels at each region where the sound is "clipped" (distorted due to excess volume).


This section contains Nyquist plug-ins which may include:
Beat Finder Creates labels at each detected "beat".

Regular interval labels Creates equally spaced labels. These can be used to export multiple smaller files of identical size from one long track.

Silence finder Creates labels at detected areas of silence or near-silence in an audio selection.

VAMP plug-ins will appear in this menu too, if they are installed.


Contents

Plot Spectrum...

Frequency Analysis of a chirp tone followed by the word "Audacity"


This takes the selected audio (which is a set of sound pressure values at points in time) and converts it to a graph of frequencies against amplitudes. This is done using a mathematical algorithm known as a Fast Fourier Transform or FFT. This gives a value for each narrow band of frequencies that represents how much of those frequencies is present. All the values are then interpolated to create the graph.

There is an audio version of the Uncertainty Principle that says "Frequency_Resolution*Time_Resolution = 2." The PlotSpectrum tools lets you choose the FFT size which is the number of consecutive audio samples to be analyzed. If you choose 1024 samples, you will get 512 frequency bins covering the frequency range up to half the sampling frquency. Most projects use 44.1kHz sampling frequency. Thus, in this example, Time_Resolution = 1024/44.1 = 23.2 milliseconds and the frequency resolution is 44100/2/512 = 43 Hz.

Another PullDown is Function which offers choices like Rectangular, Hanning, Hamming, and others. We suggest you use Hanning (actually it is a Hann window, but Hanning is widely accepted) for most situations. The fundamental principle at work here is that the way we observe our data changes what we see. The "true spectrum" of your project would be computed over the entire project and would provide very detailed frequency resolution but essentially no time resolution at all. In other words, this "true spectrum" would offer an average frequency distribution over the entire project. If we select a short interval of audio, the short-time spectrum has frequency resolution limited by the observation window time AND the result is affected by the spectrum of the window itself. For general audio analysis, the Rectangular window is least desirable, and the other options offer slightly different effects.

Aside: the Plot Spectrum seems to do some averaging over the selected window up to the 23.8 sec limit. -- I need to get the details to better explain what is happening. For example, the Rectangular window generates bumpy sidelobes and our PlotSpectrum smooths that out to invisibility. How?

Note that currently only the first 23.8 seconds of selected audio can be analyzed.

The image above is a spectrum of the word 'Audacity' spoken aloud. This is the same waveform used as part of the example on the Track Drop-Down Menu page.

The following drop-down boxes let you configure the way the plot is calculated:

Algorithm

Determines what type of processing is done on the audio data.

  • Spectrum: (default) - Plots the FFT of the data as described above.
  • Autocorrelation: These options measure to what extent the sound repeats itself. This is done by taking two copies of the audio, and moving one forward by one sample. The two copies are then multiplied together, and all the values added up. This is repeated for two samples difference and so on, up to the number of samples in the size option. This gives a small result if the waveform is random (for example, noise) and a large result if it is repetitive (like a musical note). By looking at the peaks in the plot, the key frequencies present can be determined even if there is a lot of noise.
  • Cepstrum:

Size

This controls how many frequency divisions are used for the spectrum, or how many samples are used for autocorrelation. In Spectrum, a larger size gives more accurate frequency resolution (narrow bands), but averages the result over a longer period of time (because more samples are needed for the calculation). In Autocorrelation, a larger size looks for repeating patterns over a larger range of time offsets, and so will detect lower frequency patterns. With either algorithm, Audacity will show a warning if the selected region is too short for the chosen size.

Function

Selects which mathematical function is used to pre-process the data. The basic forms of the FFT and autocorrelation algorithm require infinitely long sections of audio to work on, and so take infinitely long to complete. Hence the available audio must be pre-processed in such a way that the finite length of the audio has minimum effect. The available functions are known as "windows":

  • Rectangular: is the simplest - it just cuts off the given block of samples with a sharp cut, and so leaves a sharp click at each end of the data. This means the results are often poor with a lot of random frequencies in them.
  • Hamming, Hanning, Bartlett: do a smooth fade in and out of the audio data, and so give cleaner, more accurate results. Can someone explain what the differences are? I've only done Hamming!
  • Blackman, Blackman-Harris:
  • Welch:
  • Gaussian:

Axis

When using the Spectrum, the frequencies can be displayed on a linear scale (default, which gives equal width to each increment on the scale) or on a logarithmic scale.

Find Clipping...

Looks for and displays runs of "clipped" samples in a Label Track, as a screen-reader accessible alternative to View > Show Clipping. The number of samples for the "Start threshold" and "Stop threshold" is configurable, and set to three by default. The "threshold" is the number of contiguous clipped samples that must be present before they will be labeled as a run. The Start threshold therefore means the number of clipped samples that must be present to left of a non-clipped sample before it will be labeled as an individual run, and Stop threshold the number that must be present to right of a non-clipped sample before it will be labeled as an individual run. Note that unlike "Show Clipping", "Find Clipping" is not automatic, so after any editing that affects volume, or after import or recording of a new track, Find Clipping must be run again.

Each individual run of clipped samples is marked in the format "number of number". For example, "11 of 11" means there are 11 samples in this run of clipped samples and all of them are clipped, while "9 of 11" means only nine samples in the run of 11 are clipped. Note that in the case of a stereo track, each channel will have its own label, so if at one point both channels are clipped, two labels will appear above each other.

Beat Finder...

Beat Finder attempts to place labels at beats which are much louder than the surrounding audio. It's a fairly rough and ready tool, and won't necessarily work well on a typical modern pop music track with compressed dynamic range. If you don't get enough beats detected, try reducing the "Threshold Percentage" setting.

Regular interval labels...

This places labels in a long track so as to divide it into smaller, equally sized segments. For example, you may want to break up a long file into smaller audio files for distribution on the internet. The labels can contain the name of the separate files, then File > Export Multiple... will export all the files in one process based on the label points. You can either choose the number of labels to be created, or the interval between them.

Silence Finder...

This also places labels in a long track to divide it up, but does so at areas of silence according to the level and duration of silence you specify. This is very useful to break up a long recording such as from an LP or cassette into its individual tracks. The labels can contain the name of each track, and then File > Export Multiple... will export audio files in one process corresponding to each track of the recording. If too many silences are detected, increase the silence level and duration; if too few are detected, reduce the level and duration.

Views
Help Location